package com.atguigu.srb.servicesms.pojo;

import lombok.Data;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * ClassName: SmsProperties
 * Package: com.atguigu.srb.servicesms
 * Description:
 *
 * @Author 王晓龙
 * @Create 2023/3/29 20:33
 * @Version 1.0
 */
@ConfigurationProperties(prefix = "aliyun.sms")
@Data
public class SmsProperties implements InitializingBean {
    private String host;
    private String path;
    private String method;
    private String appcode;

    public static String HOST;
    public static String PATH;
    public static String METHOD;
    public static String APPCODE;

    //对象初始化后调用
    @Override
    public void afterPropertiesSet() throws Exception {
        SmsProperties.HOST = this.host;
        SmsProperties.PATH = this.path;
        SmsProperties.METHOD = this.method;
        SmsProperties.APPCODE = this.appcode;
    }
}
